<?php
/* @var $this NewsController */
/* @var $model News */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'news-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'id'); ?>
		<?php echo $form->textField($model,'id'); ?>
		<?php echo $form->error($model,'id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_id'); ?>
		<?php echo $form->textField($model,'user_id'); ?>
		<?php echo $form->error($model,'user_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>100,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sub_content'); ?>
		<?php  $this->widget('application.extensions.cleditor.ECLEditor', array(
            'model'=>$model,
            'attribute'=>'sub_content',
            'options'=>array(
                'width'=>'300',
                'height'=>'150',
                'useCSS'=>true,
            ),
            'value'=>$model->sub_content,
         )); ?>
		<?php echo $form->error($model,'sub_content'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php  $this->widget('application.extensions.cleditor.ECLEditor', array(
            'model'=>$model,
            'attribute'=>'content',
            'options'=>array(
                'width'=>'500',
                'height'=>'250',
                'useCSS'=>true,
            ),
            'value'=>$model->content,
         )); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'fileattached'); ?>
		<?php echo $form->textField($model,'fileattached',array('size'=>100,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'fileattached'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->